package org.nowcoder.huawei.c100;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class HC013 {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String s = br.readLine();
            solve(s);
        } catch (Exception ignore) {

        }
    }


    public static void solve(String s) {
        List<Integer> results = new ArrayList<>();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (Character.isDigit(c)) {
                results.add(Integer.parseInt(String.valueOf(c)));
            }
            if ('-' == c) {
                StringBuilder builder = new StringBuilder("-");
                for (int j = i + 1; j < s.length(); j++) {
                    char v = s.charAt(j);
                    if (Character.isDigit(v)) {
                        i = j;
                        builder.append(v);
                    }
                    if ('-' == v) {
                        break;
                    }
                }
                results.add(Integer.parseInt(builder.toString()));
            }
        }
        System.out.println(results.stream().mapToInt(Integer::intValue).sum());
    }
}
